
const model = require('../model')
const r=require('../dto/resp')
const routerObj=require('./ddApiController')
var fetchApis = async (ctx, next) => {
    let apis=[]
    Object.keys(routerObj).map(k=>{
        let values=k.split(' ')
        if(values.length>2){
            apis.push({
                uri:values[1],
                name:values[2]
            })
        }
    })

    ctx.body=r().setItems(apis)
};


module.exports = {
    'GET /v1/apis': fetchApis,
};